package com.nightpiter.view.graphics;

import com.nightpiter.view.graphics.abstaractions.AbstractRect;
import com.nightpiter.view.graphics.abstaractions.Delegator;
import com.nightpiter.view.graphics.factories.RectFactory;

public class Rect extends Delegator<AbstractRect> implements AbstractRect {

	public Rect() {
		setDelegate(RectFactory.getFactory().create());
	}

	public Rect(int left, int top, int right, int bottom) {
		setDelegate(RectFactory.getFactory().create(left, top, right, bottom));
	}

	public Rect(Rect rect) {
		setDelegate(RectFactory.getFactory().create(rect));
	}

	public boolean contains(int x, int y) {
		return getDelegate().contains(x, y);
	}

	public boolean contains(Rect r) {
		return getDelegate().contains(r);
	}

	public int getBottom() {
		return getDelegate().getBottom();
	}

	public int getLeft() {
		return getDelegate().getLeft();
	}

	public int getRight() {
		return getDelegate().getRight();
	}

	public int getTop() {
		return getDelegate().getTop();
	}

	public int height() {
		return getDelegate().height();
	}

	public void setBottom(int bottom) {
		getDelegate().setBottom(bottom);
	}

	public boolean setIntersect(Rect a, Rect b) {
		return getDelegate().setIntersect(a, b);
	}

	public void setLeft(int left) {
		getDelegate().setLeft(left);
	}

	public void setRight(int right) {
		getDelegate().setRight(right);
	}

	public void setTop(int top) {
		getDelegate().setTop(top);
	}

	public int width() {
		return getDelegate().width();
	}

}
